package com.xbongbong.paas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;

/**
 * 控件类型的枚举
 * @author 梁鲁江
 * @version v1.0
 * @date 2019/1/22 9:26
 * @since v1.0
 */
public enum WidgetTypeEnum {
    /**
     * 控件枚举
     */
    RADIOTYPE(1,"radioType","enum.widgetType.msg.radiotype"),
    SWITCH(2,"switch","enum.widgetType.msg.switch"),
    COMBO(3,"combo","enum.widgetType.msg.combo"),
    ;
    /** 枚举值- */
    private final int		code;
    /** 控件的英文描述*/
    private final String alias;
    /** 中文描述 */
    private final String msg;

    WidgetTypeEnum(int code, String alias, String msg) {
        this.code = code;
        this.alias = alias;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getAlias() {
        return alias;
    }

    public String getMsg() {
        return I18nMessageUtil.getMessage(msg);
    }
}
